package com.dfbz.homework11;

import org.junit.jupiter.api.Test;
import org.junit.runner.Computer;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class main {
   @Test
   public static void main(String[] args) throws InvocationTargetException, IllegalAccessException, InstantiationException {
       Class<Test01> test01Class = Test01.class;
       Test01 test01 = test01Class.newInstance();
       Method[] declaredMethod = test01Class.getDeclaredMethods();
       for (Method method : declaredMethod) {
           if(method.isAnnotationPresent(MyTest.class)){
               method.invoke(test01);
           }
       }

   }
}
